package com.sanyang.lawyer.mapper.audit;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sanyang.lawyer.ResultApi.ResponseResult;
import com.sanyang.lawyer.entity.Audit;
import com.sanyang.lawyer.entity.Case_audit;
import com.sanyang.lawyer.entity.Case_law;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface Audit_remissionMapper extends BaseMapper<Case_audit> {

    @Insert("insert into case_audit(caseid,auditid,remission_money)" +
            "values(#{caseid.caseId},#{auditid.auditid},#{remissionMoney}) ")
    public void insertOne(Case_audit auditRemission);
    
    
    @Insert("insert into audit (auditid,submitid,remark,typeid,submit_time,state)" +
            " values(#{auditid},#{submitid.userId}," +
            "#{remark},#{typeid.typeid},#{submitTime}," +
            "#{state})")
    public void insertInAudit(Audit audit);

    
    //根据流程id查询出对应的案件信息和费用减免金额
    public Case_audit queryCaseAndRemissionByProcessid(String processid);

    
    //完成审核修改数据
    @Update("update audit set audit_time = #{auditTime}, audit_userid=#{auditUserid.userId}," +
            " comment = #{comment},if_pass = #{if_pass}" +
            "where auditid = #{auditid}")
    public void complateUpdate(Audit audit);



    //查询出当前登陆的用户对应.的所有的费用申请
    public List<Case_audit> queryremissionAll(Case_law case_law);
    
    
}
